﻿using System;
using ProjectBase.Core.PersistenceSupport;
using ProjectBase.Core;

namespace SLSYJ.Core
{
    public class Bank : PersistentObject
    {
        protected Bank() { }

        public Bank(string name, string account)
        {
            Check.Require(!String.IsNullOrEmpty(name), "name may not be null or empty");
            Check.Require(!String.IsNullOrEmpty(account), "account may not be null or empty");
            AccountNumber = account;
            Name = name;
        }

        [DomainSignature]
        public virtual string Name { get; set; }

        [DomainSignature]
        public virtual string AccountNumber { get; set; }

        public virtual string CBUNumber { get; set; }

        protected override string GetDomainObjectSignature()
        {
            return Name + "|" + AccountNumber;
        }
    }
}
